import React, {useState} from "react";
import CardList from "@/pages/radar/Events/DataView/cardview";
import TableList from "@/pages/radar/Events/DataView/listview/TableList";

interface DataViewProps {
  editable: boolean;
}

const DataView: React.FC<DataViewProps> = (props) => {

  const [viewType, setViewType] = useState<string>('card')

  if (viewType === "card") {
    return <CardList editable={props.editable}/>;
  } else {
    return <TableList/>;
  }
}

export default DataView
